package com.lvsc.sdaplacefinder.dao;

import java.io.Serializable;
import java.util.List;

import com.lvsc.sdaplacefinder.dao.model.EntityModel;

public interface DAO {

	public <T extends EntityModel> List<T> findAll(Class<T> clazz);

	public <T extends EntityModel> List<T> findByExample(T instance);

	public <T extends EntityModel> void persist(T entity);

	public <T extends EntityModel> T getById(Serializable id, Class<T> clazz);

	public <T extends EntityModel> T merge(T transientInstance);

	public void delete(EntityModel persistentInstance);

	public <T extends EntityModel> SodaQuery<T> getQuery(Class<T> clazz);

	public <T extends EntityModel> List<T> find(SodaQuery<T> c);

	public <T extends EntityModel> int count(Class<T> clazz);

}
